x86 hvm: Warn only once per time source when the periodic tiemout is
authorKeir Fraser <keir.fraser@citrix.com>
Tue, 6 May 2008 15:20:54 +0000 (16:20 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Tue, 6 May 2008 15:20:54 +0000 (16:20 +0100)
set 'too small'.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen/arch/x86/hvm/vpt.c
xen/include/asm-x86/hvm/vpt.h

index 16f886647dc445604490084ba286ee3b19a0047e..832c9042d717bbb5f7716aa9977654bbd00c6d03 100644 (file)
@@ -338,9 +338,9 @@ void create_periodic_time(
     /* Periodic timer must be at least 0.9ms. */
     if ( (period < 900000) && !one_shot )
     {
-        gdprintk(XENLOG_WARNING,
-                 "HVM_PlatformTime: program too small period %"PRIu64"\n",
-                 period);
+        if ( !test_and_set_bool(pt->warned_timeout_too_short) )
+            gdprintk(XENLOG_WARNING, "HVM_PlatformTime: program too "
+                     "small period %"PRIu64"\n", period);
         period = 900000;
     }
 
index b7176e89b192faab4c5b844ddf588a32b95b7309..d05d0dfa27ce71cc9d6bb097c0f6c26ca60a4697 100644 (file)
@@ -78,6 +78,7 @@ struct periodic_time {
     bool_t one_shot;
     bool_t do_not_freeze;
     bool_t irq_issued;
+    bool_t warned_timeout_too_short;
 #define PTSRC_isa    1 /* ISA time source */
 #define PTSRC_lapic  2 /* LAPIC time source */
     u8 source;                  /* PTSRC_ */